﻿(function ($) {

    var arrowCK = function (target, settings) {

        var $target = $(this);
        settings.starget
        settings.etarget
        $pageEditorMainBox = $(".pageEditorMainBox");


        currentline = line(settings.starget);

        $("#container").bind('mousemove',
            function (e) {
                x = e.pageX;
                y = e.pageY - $pageEditorMainBox.get(0).offsetTop;
                currentline.updateEndPoint(x - 5, y - 5);
                $target.clickFunction({

                    isarrowclick: 1,
                    currentlinetarget: currentline
                });

            });
        restartlineanditem();
    }


    jQuery.fn.arrowclick = function (options) {
        settings = jQuery.extend({
            starget: null,
            etarget: null
        }, options);
        arrowCK(this, settings);
        return this;
    };

})(jQuery);


